package com.yhd.gmall.spring.tx;

import java.util.ArrayList;
import java.util.List;

/**
 * @author yhd
 * @createtime 2020/9/28 10:33
 */
public class DemoA {
    public static void main(String[] args) {
        String str = "0012,x388w,w98|73|87x234,23238Uy,7893,23|2|34,1";
        List<String> list = new ArrayList<>();
        String[] strs = str.split(",");
        for (String st : strs) {
            while (st.length() < 6) {
                st = "0" + st;
            }
            if (st.length() > 6) {
                st = st.substring(0, 6);
            }
            if (st.length() == 6) {
                String strReplace = st.replace("|", "*");
                list.add(strReplace);
            }
        }
        list.forEach(System.out::println);
    }
}
